package com.example.activity_usage;

import android.content.Intent;
import android.os.Bundle;

import com.example.activity_usage.datatrans.SendDataActivity;
import com.example.activity_usage.jump.JumpStartActivity;
import com.example.activity_usage.login.LoginInputActivity;
import com.google.android.material.snackbar.Snackbar;

import androidx.appcompat.app.AppCompatActivity;

import android.view.View;

import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;

import com.example.activity_usage.databinding.ActivityMainBinding;

import android.view.Menu;
import android.view.MenuItem;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Button btnJump = findViewById(R.id.btn_jump_usage);
        btnJump.setOnClickListener(this);

        Button btnLoginUsage = findViewById(R.id.btn_login_usage);
        btnLoginUsage.setOnClickListener(this);

        Button btnDataTrans = findViewById(R.id.btn_data_trans_usage);
        btnDataTrans.setOnClickListener(this);

        btnDataTrans.performClick();
    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.btn_jump_usage) {
            Intent intent = new Intent();
            intent.setClass(MainActivity.this, JumpStartActivity.class);
            startActivity(intent);
        } else if (v.getId() == R.id.btn_login_usage) {
            Intent intent = new Intent();
            intent.setClass(MainActivity.this, LoginInputActivity.class);
            startActivity(intent);
        } else if (v.getId() == R.id.btn_data_trans_usage) {
            Intent intent = new Intent(this, SendDataActivity.class);
            startActivity(intent);
        }
    }
}